Package edu.uky.ai.lp.ai
Class Path
java.lang.Object
edu.uky.ai.lp.ai.Path
public class Path
extends java.lang.Object
Utility methods for navigating paths though the Wumpus World.
- Author:
- Stephen G. Ware
-
Constructor Summary
Constructors Constructor Description Path() -
Method Summary
Modifier and Type Method Description static java.lang.StringgetNewLocation(java.lang.String current, Action action)Given the player's current location and a next move action to take, return the player's new location after the action is taken.static Actionpath(java.lang.String from, java.lang.String to, java.util.Set<java.lang.String> visited)Given the player's current location and intended destination, return the next move action that needs to be taken to get to the destination.
-
Constructor Details
-
Path
public Path()
-
-
Method Details
-
path
public static final Action path(java.lang.String from, java.lang.String to, java.util.Set<java.lang.String> visited)Given the player's current location and intended destination, return the next move action that needs to be taken to get to the destination. Only visited squares will be considered.- Parameters:
from- the player's current locationto- the player's destinationvisited- the set of visited squares- Returns:
- the next move action to take to reach the destination
-
getNewLocation
Given the player's current location and a next move action to take, return the player's new location after the action is taken.- Parameters:
current- the player's current locationaction- the next move action to take- Returns:
- the player's location after the action
-